home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / mcode_01 / source / general / rezcheck.s < prev    next >
Encoding:
Text File  |  1995-04-27  |  1.1 KB  |  38 lines

  1. * Program     : To check the screen resolution
  2. * Author    : Stephen McNabb
  3. * Creation date : 15th February 1995
  4. * Last update    : 15th February 1995
  5. * Parameters    : None
  6. * Output    : Value returned in d0
  7. *           0 - Low resolution
  8. *          1 - Medium resolution
  9. *          2 - High resolution
  10.  
  11. start:    jsr    cls        /clear the screen
  12.     move.w    #4,-(sp)    /use Getrez() function
  13.     trap    #14        /use xbios
  14.     addq.l    #2,sp        /tidy up stack
  15.     
  16.     cmpi.b    #1,d0        /compare d0 with value 1
  17.     beq    med        /if it is we are in medium resolution
  18.     blt    low        /if less we are in low resolution
  19.     bgt    high        /if greater then we are in high resolution
  20.     
  21. low:    move.l    #lowrez,d0    /move address of lowrez message to d0
  22.     bra    print        /and print it
  23. med:    move.l    #medrez,d0    /or move address of medrez message to d0
  24.     bra    print        /and print it
  25. high:    move.l    #highrez,d0    /or move highrez message to d0 and print it
  26.  
  27. print:    jsr    ptext        /jump to 'print text' routine
  28. end:    bra    exit        /and exit from program
  29.     
  30.     include "\SOURCE\FUNCTION.S"    /include standard functions
  31.     
  32. *** Program Data ***    
  33.     
  34. lowrez:    dc.b    'Low resolution',0
  35. medrez:    dc.b    'Medium resolution',0
  36. highrez:dc.b    'High resolution',0
  37.     
  38. *** End of file ***